package com.eva.client.config.api;

import com.eva.client.config.biz.ClientConfigBiz;
import com.eva.framework.common.api.BaseController;
import com.eva.framework.common.model.ApiResponse;
import com.eva.client.config.model.ClientConfig;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "系统客户端配置")
@Slf4j
@RestController
@RequestMapping("/system")
public class ClientConfigController extends BaseController {

    @Resource
    private ClientConfigBiz clientConfigBiz;

    @GetMapping("/client/config")
    @ApiOperation("获取客户端配置")
    public ApiResponse<ClientConfig> getClientConfig () {
        return ApiResponse.success(clientConfigBiz.getClientConfig());
    }
}
